import request from '@/utils/request'

export default {
  // 列表
  query(data) {
    return request({
      url: `/v1/supplier/check-bill/list`,
      method: 'post',
      data
    })
  },
  // 编辑
  update(data) {
    return request({
      url: `/v1/supplier/check-bill/update`,
      method: 'post',
      data
    })
  },
  // 详情
  detail(params) {
    return request({
      url: `/v1/supplier/check-bill/detail`,
      method: 'get',
      params
    })
  },
  // 详情
  templateDetail(data) {
    return request({
      url: `/v1/supplier/check-bill/template-detail`,
      method: 'post',
      data
    })
  },
  // 编辑
  add(data) {
    return request({
      url: `/v1/supplier/check-bill/add`,
      method: 'post',
      data
    })
  },
  // 生成对账单详情
  supplierDetail(params) {
    return request({
      url: `/v1/supplier/supplier-bill/detail`,
      method: 'get',
      params
    })
  },
  // 上传回执
  upload(data) {
    return request({
      url: `/v1/supplier/check-bill/upload-receipt`,
      method: 'post',
      data
    })
  },
  // 作废对账单
  cancel(data) {
    return request({
      url: `/v1/supplier/check-bill/batch-cancel`,
      method: 'post',
      data
    })
  },
}
